import React from 'react'
import { Routes, Route } from 'react-router-dom'
import { Layout } from 'antd'

import MainLayout from './components/Layout/MainLayout'
import ScriptEditor from './pages/ScriptEditor'
import ScriptManager from './pages/ScriptManager'
import ConnectionManager from './pages/ConnectionManager'
import ExecutionHistory from './pages/ExecutionHistory'
import VersionHistory from './pages/VersionHistory'

const { Content } = Layout

const App: React.FC = () => {
  return (
    <Layout style={{ minHeight: '100vh' }}>
      <Routes>
        <Route path="/" element={<MainLayout />}>
          <Route index element={<ScriptEditor />} />
          <Route path="scripts" element={<ScriptManager />} />
          <Route path="connections" element={<ConnectionManager />} />
          <Route path="executions" element={<ExecutionHistory />} />
          <Route path="versions" element={<VersionHistory />} />
        </Route>
      </Routes>
    </Layout>
  )
}

export default App